<?php

//Example Script, saves Hello World to the database.

//First, we need to include redbean
require_once('rb.php');

//Second, we need to setup the database

//If you work on Mac OSX or Linux (or another UNIX like system)
//You can simply use this line:

  R::setup('mysql:host=localhost;dbname=test',
        'school','admin123');

//Ready. Now insert a bean!
$test = r::dispense('test');
$test->naam = "naam";
$test->email ="giemiebier@gmail.com";
$test->adres ="adres";
$test->woonplaats ="groningen";
R::store($test);

$test123 = r::dispense('adres');
$test123->woonplaats = "groningen";
R::store($test123);


$test = R::load('test',39);
echo $test->naam;

//$bean = R::dispense('leaflet');
//$bean->title = 'Hello World';

//Store the bean
//$id = R::store($bean);

//Reload the bean
//$leaflet = R::load('leaflet',$id);

//Display the title
//echo $leaflet->title;




